Conventionally, a brushless motor or the like that controls electric power supply to a winding wire according to a rotation angle of a rotor has a position sensor for detecting the rotation angle, which is disclosed in WO2008/062778 (WO '2778). The position sensor is known to detect a rotation angle in the brushless motor by having a magnet disposed on a rotating part that rotates together with the rotor, and by detecting a magnetic field generated by the magnet with a magnetic sensor such as a Hall element or a magneto-resistive element. In such motor, a conducting wire that connects (a) a control unit controlling electricity to supply the electric power to a winding wire and (b) a winding wire of the motor has an electric current flowing therein, a magnetic field is formed around the connecting wire. Therefore, the magnetic sensor detecting the magnetic field of the magnet will be affected by the magnetic field formed around the conducting wire. If the motor has a configuration that arranges the conducting wire closed to the magnetic sensor, the detection result of the magnetic sensor is caused to have an error, thereby deteriorating a detection accuracy. When the detection accuracy is deteriorated, a torque ripple of the motor may be increased, or loss of output power may be caused. More specifically, if the motor is used to generate a steering assist torque in an electric power steering apparatus in a vehicle, an increase of the torque ripple of the motor leads to an increase the steering assist torque, and, as a result, a smooth steering assist torque is not provided for the driver of the vehicle.